package com.cefa.edu.dao;

import com.cefa.edu.dao.provider.CefaEduSampleProvider;
import com.cefa.edu.datasource.DataSource;
import com.cefa.edu.model.CefaEduSample;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by lsy on 2017/11/14.
 */
@Mapper
public interface CefaEduSampleMapper {

    @DataSource("cefaedu")
//    @Select("SELECT id, name FROM cefa_edu_sample WHERE id = #{id}")
    // Get SQL string from provider
    @SelectProvider(type= CefaEduSampleProvider.class, method = "getSampleQueryString")
    @Results({
            @Result(property = "id", column = "id"),
    })
    CefaEduSample getSample(@Param("id") Integer id);
}
